package cn.jhz.learn.community_dynamic;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.UUID;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.sun.tools.rngom.ast.om.ParsedPattern;

import cn.jhz.learn.community_dynamic.common.util.MineCommonUtil;
import cn.jhz.learn.community_dynamic.model.LoginIdEntity;
import cn.jhz.learn.community_dynamic.security.validation.RegexpRules;
import net.bytebuddy.asm.Advice.This;

public class TEST {
    public static void main(String[] args) {
	System.out.println(MineCommonUtil.getNextYear(MineCommonUtil.getCurrentYear()));
//	for (int i = 0; i < 12; i++) {
//	    System.out.println(MineCommonUtil.setMonth(date, i));
//	}
//	List<Integer> list = new ArrayList<>();
//	list.add(1);
//	list.add(2);
//	
//	
//	System.out.println(list.contains(1));
	//	PasswordEncoder encoder =  PasswordEncoderFactories.createDelegatingPasswordEncoder();
//	System.out.println(encoder.encode("ZJH.123"));
//	String content = "hasAuthority('test')";
//	 
//	      String pattern = ".*permission.*";
//	 
//	      boolean isMatch = Pattern.matches(pattern, "permission::list");
//	      System.out.println("字符串中是否包含了 'test' 子字符串? " + isMatch);
	
//	
//	
//	String content = "hasAuthority('1234')"; 
//	
//	Pattern regex1 = Pattern.compile("\\(\\'.*\\'\\)");
//	Matcher matcher1 = regex1.matcher(content);
//	
//	
//	System.out.println("字符串中是否包含了 'test' 子字符串? " + matcher1.find());
//	String content2 = matcher1.group();
//	System.out.println(content2.replaceAll("[\\(\\)\\']", ""));
//	Random random = new Random();
//	Double len = Math.pow(10, 9 - 1);
//	Set<Long> idSet = Stream.generate(random::nextDouble).parallel().map(val->(long)((val*9+1)*len)).limit(10000).collect(Collectors.toSet());
//	idSet.parallelStream().map(IdPoolEntity::new).collect(Collectors.toList());
//	System.out.println(idSet.size());
//	for (Long long1 : idSet) {
//	    System.out.println(long1);
//	}
//	String str1 = "12345678";
//	String str2 = "012345678";
//	System.out.println(Pattern.matches(RegexpRules.loginId, str1));
//	System.out.println(Pattern.matches(RegexpRules.loginId, str2));
    }
}
